package com.sun.androidexerciseproject.function.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.sun.androidexerciseproject.function.logreport.util.LogUtil;
import com.sun.androidexerciseproject.function.phone.PhoneActivity;

/**
 * Description:
 * File: BootReceiver.java
 * Author: Administrator
 * Create: 2019/1/10 0010 下午 17:28
 */
public class BootReceiver extends BroadcastReceiver {
    private static final String ACTION_BOOT = Intent.ACTION_BOOT_COMPLETED;

    @Override
    public void onReceive(Context context, Intent intent) {
        LogUtil.d("BootReceiver onReceive action " + intent.getAction());
        if (ACTION_BOOT.equalsIgnoreCase(intent.getAction())) {
            context.startActivity(new Intent(context, PhoneActivity.class));
        }
    }
}
